package java.nio.channels;

import java.io.IOException;
import java.io.Closeable;

/**
 * A nexus for I/O operations.
 * 为I/O操作建立的连接，一切皆IO(硬件，文件，网络，程序组件等)
 */
public interface Channel extends Closeable {

    /**
     * Tells whether or not this channel is open.
     * 通道是否开启
     */
    public boolean isOpen();

    /**
     * 同步调用
     * 幂等设计
     */
    public void close() throws IOException;

}
